home *** CD-ROM | disk | FTP | other *** search
/ PsL Monthly 1993 December / PSL Monthly Shareware CD-ROM (December 1993).iso / prgmming / dos / c / uw_1.exe / UW_TUT1.C < prev    next >
Text File  |  1992-11-02  |  2KB  |  44 lines

  1. /****************************************************************************/
  2. /* UW_TUT1.C                                                                */
  3. /*                                                                          */
  4. /* NOTE: THIS FILE IS PUBLIC DOMAIN AND MAY BE MODIFIED AND USED AT WILL    */
  5. /*                                                                          */
  6. /* We start off by showing a minimum program, the infamous "hello world",   */
  7. /* UltraWin style.  As you can see, it's very small and simple.  We simply  */
  8. /* init the video, create and set a window, write text to it, wait for a    */
  9. /* key, cleanup and exit. That's it!                                        */
  10. /*                                                                          */
  11. /*                                                         Dr. Boyd Gafford */
  12. /*                                                         Kevin Huck       */
  13. /*                                                         EnQue Software   */
  14. /*                                                         08/31/92         */
  15. /****************************************************************************/
  16. #include <ctype.h>
  17. #include "uw.h"                           /* include the necessary headers  */
  18.  
  19. /*----------------------- global window variables --------------------------*/
  20. WINDOW   Window1;
  21.  
  22. /*********/
  23. /* ~main */
  24. /*       ********************************************************************/
  25. /*  Show basic window creation and output.                                  */
  26. /****************************************************************************/
  27. int main()
  28. {
  29.   WINDOW *wnp;
  30.   
  31.   wnp = &Window1;                         /* point to global window struct  */
  32.   init_video(80, 25);                     /* init video for 80 x 25 screen  */
  33.   wn_create(20, 5, 60, 20, SLD_BDR, WN_POPUP, wnp);        /* create window */
  34.   wn_set(wnp);                            /* display window in screen       */
  35.   wn_plst( CENTERED, 7, "Hello world from UltraWin!", wnp);
  36.   wait_event();                           /* wait for a keystroke           */
  37.   wn_destroy(wnp);                        /* remove the window from screen  */
  38.   end_video();                            /* clean up before we exit        */
  39.   return(1);
  40. }
  41. /*** end of main ***/
  42.  
  43. /*** END OF FILE ***/
  44.